home *** CD-ROM | disk | FTP | other *** search
/ MacTech 1 to 12 / MacTech-vol-1-12.toast / Source / MacTech® Magazine / Volume 07 - 1991 / 07.05 May 91 / Multifile source ƒ / mfile.h < prev    next >
Encoding:
C/C++ Source or Header  |  1987-12-28  |  2.0 KB  |  73 lines  |  [TEXT/MPS ]

  1. /*
  2. **    File mfile.h
  3. **    Header file for MultiFile dialog.
  4. **
  5. **    Copyright © Eric Schlegel 1987, 1988
  6. */
  7.  
  8.  
  9. typedef struct fstruct {
  10.     OSType        ftype;            /* the file type                        */
  11.     short        vrefnum;        /* a vrefnum (or wdrefnum) for the file    */
  12.     short        fver;            /* the file's version                    */
  13.     String(63)    fname;            /* the file's name in Pascal form        */
  14. } FSTRUCT;
  15.  
  16. extern void get_tl();
  17. /* args:
  18.     Point    *where;        Pass in a pointer to a point; get_tl will figure out
  19.                         for you where the top left corner of the multifile dlg
  20.                         should be so that it is centered half-way across the 
  21.                         screen and one-third down, and return that point. You
  22.                         can then pass in the point as the "where" argument of
  23.                         multifile().
  24.    return val:
  25.        None.
  26. */
  27.  
  28. extern Boolean    multifile();
  29. /* args:
  30.     Point        *where;        The top left corner of the multifile dialog.
  31.     char        *prompt;    A prompt string to label the file list. For example, 
  32.                             "Files to process:". The string should be at most
  33.                             255 chars long, plus the ending null.
  34.     ProcPtr        filefilt;    Your file filter function.
  35.     short        numtypes;    How many types are in the typelist.
  36.     SFTypeList    *typelist;    A list of types to display.
  37.     
  38.    return val:
  39.        Multifile returns true if the user clicked in the Done button, or false if
  40.     he clicked in the cancel button.
  41. */
  42.  
  43. extern int         numfiles();
  44. /* args:
  45.     None.
  46.     
  47.    return val:
  48.     Numfiles returns the number of files that the user collected. This number
  49.     will be valid even if the user exited by clicking on Cancel, but in that
  50.     case you usually wouldn't want to retrieve the files anyway.
  51. */
  52.  
  53. extern void        getfile();
  54. /* args:
  55.     short            fileno;        The number of the file to retrieve. The first
  56.                                 file is number 1.
  57.     struct fstruct    *fstrct;    A pointer to an fstruct. The fields of the 
  58.                                 fstruct will be filled with info about the
  59.                                 selected file.
  60.                                 
  61.   return val:
  62.       None.
  63. */
  64.  
  65. extern void        freemf();
  66. /* args:
  67.     None.
  68.     
  69.    return val:
  70.        None.
  71.     
  72.    Call this once you've retrieved all the file names using getfile().
  73. */